import Vue from 'vue'
import Vuex from 'vuex'
import createPersistedstate from 'vuex-persistedstate'
import user from './modules/user'

Vue.use(Vuex)

export default new Vuex.Store({
  modules: {
    user
  },
  plugins: [
    createPersistedstate({
      key: 'cloud-user',
      // 需要缓存的模块
      paths: ['user', 'pay', 'webConfig'],
      storage: window.sessionStorage
    })
  ]
  // state: {
  // },
  // getters: {
  // },
  // mutations: {
  // },
  // actions: {
  // },
  // modules: {
  // }
})
